// 创建modal框
export const createModalComp = (options: Object) => {
	const opt = Object.assign({
		title: "提示",
		content: "请输入内容",
		showCancel: true,
		cancelText: "取消",
		confirmText: "确定",
		success: () => {},
		fail: () => {},
	}, options);
	return uni.showModal(opt);
};

// 创建提示框
export const createToastComp = (options: Object, type: string) => {
	const opt: any = Object.assign({
		title: "提示",
		mask: true,
		duration: 2000,
		icon: type
	}, options);
	return uni.showToast(opt);
};

// 创建loading
export const createLoadingComp = (options: Object) => {
	const opt = Object.assign({
		title: "加载中...",
		mask: true,
	}, options);
	return uni.showLoading(opt);
};
